/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Annuaire;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class ClientRecherche {

	public static void main(String[] args) throws Exception {

		Registry registry = LocateRegistry.getRegistry();

		AnnuaireInf ref_obj_distant = (AnnuaireInf) registry
				.lookup("Annuaire");
		
		Thread.sleep(2000);
		System.out.println(ref_obj_distant.getNumero("Coquerelle"));
		Thread.sleep(2000);
		System.out.println(ref_obj_distant.getNumero("Toto"));
		Thread.sleep(2000);
		System.out.println(ref_obj_distant.getNumero("Coquerelle"));
		Thread.sleep(2000);
		System.out.println(ref_obj_distant.getNumero("Toto"));
		
	}
}

